package com.terminee.behaviors;

import java.util.List;
import java.util.Map;

import com.terminee.model.Term;

/**
 * Defines common create functionality common to all behaviors involving Terms.
 * @author potlow
 *
 */
public abstract class TermBehavior extends DAOBehavior{

	@Override
	public boolean create(Object value) {
		Term buzzword;
        if (value instanceof Term) {
            buzzword = (Term) value;
        } else {
            throw new IllegalArgumentException("Search value must be a Term");
        }

        return persist(buzzword);
	}

	@Override
	abstract public Object read(Object value, List<String> properties);

	@Override
	public boolean update(Object value) {
		throw new UnsupportedOperationException("Not supported yet.");
	}
	
	@Override
	public boolean delete(Object value) {
		throw new UnsupportedOperationException("Not supported yet.");
	}

}
